﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.InteropServices;

using iPhoneUI.Shell;
using iPhoneUI.Widgets;

namespace iPhoneUI
{
    public class HomePage : Page
    {
        public HomePage()
        {
        }

        public override void Resume()
        {
            GXOpenInput(); // lock the hardware keys
            base.Resume();
        }

        public override void Suspend()
        {
            GXCloseInput(); // release the hardware case
            base.Suspend();
        }

        [DllImport("gx", EntryPoint = "?GXOpenInput@@YAHXZ")]
        private static extern int GXOpenInput();
        [DllImport("gx", EntryPoint = "?GXCloseInput@@YAHXZ")]
        private static extern int GXCloseInput();
    }
}
